{template 'common/header'}
<ul class="nav nav-tabs">
	<li {if $act == 'display'}class="active"{/if}><a href="{php echo $this->createWebUrl('signlist')}">签到记录</a></li>
</ul>
{if $act=='display'}
<div class="panel panel-info">
	<div class="panel-heading">筛选</div>
	<div class="panel-body">
		<form action="" method="post" class="form-horizontal" role="form">
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">昵称(uid)</label>
				<div class="col-sm-6 col-md-8 col-lg-8 col-xs-12">
					<input type="text" class="form-control" name="nickname" placeholder="请输入昵称或UID" value="{$_GPC['nickname']}" />
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">签到名称</label>
				<div class="col-sm-6 col-md-8 col-lg-8 col-xs-12">
					<select class="form-control" name="rid">
						<option>全部</option>
						{loop $rulelist $li}
						<option value="{$li['id']}" {if $_GPC['rid']==$li['id']}selected{/if}>{$li['name']}</option>
						{/loop}
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
				<div class="col-sm-6 col-md-8 col-lg-8 col-xs-12">
					<button class="btn btn-default"><i class="fa fa-search"></i>搜索</button>
				</div>
			</div>
		</form>
	</div>
</div>
<div class="panel panel-default ">
	<div class="table-responsive panel-body">
        <style>
            td {
                vertical-align: middle !important;
            }
        </style>
		<table class="table table-hover">
			<thead class="navbar-inner">
			<tr>
                <th width="100">签到名称</th>
                <th>头像/昵称</th>
				<th width="80">奖励</th>
				<th width="140">额外奖励</th>
				<th width="60">今天</th>
				<th width="70">
					<a title="点击排序" style="color: #428bca !important;" href="{php echo $this->createWebUrl('signlist', array('sort' => 'continue_total', 'orderby' => $orderby, 'rid' => $_GPC['rid'], 'nickname' => $_GPC['nickname']))}">
						连续 {if isset($_GPC['sort']) && $_GPC['sort'] == 'continue_total'}<span class="glyphicon {if $_GPC['orderby']=='DESC'}glyphicon-arrow-down{else}glyphicon-arrow-up{/if}" aria-hidden="true" style="font-size: 10px;"></span>{/if}
					</a>
				</th>
				<th width="70">
					<a title="点击排序" style="color: #428bca !important;" href="{php echo $this->createWebUrl('signlist', array('sort' => 'total', 'orderby' => $orderby, 'rid' => $_GPC['rid'], 'nickname' => $_GPC['nickname']))}">
						总数 {if isset($_GPC['sort']) && $_GPC['sort'] == 'total'}<span class="glyphicon {if $_GPC['orderby']=='DESC'}glyphicon-arrow-down{else}glyphicon-arrow-up{/if}" aria-hidden="true" style="font-size: 10px;"></span>{/if}
					</a>
				</th>
				<th width="110">时间</th>
				<th width="50">操作</th>
			</tr>
			</thead>
			<tbody>
			{loop $list $li}
			<tr>
                <td title="{$li['name']}">{$li['name']}</td>
				<td>
					<div class="clearfix" title="{$li['nickname']}">
						<div class="pull-left" style="width: 40px;height: 40px; overflow: hidden; border-radius: 50%;">
							<img src="{php echo tomedia($li['avatar'])}" onerror="this.src='../app/resource/images/heading.jpg'" style="width: 100%" />
						</div>
						<div class="pull-left" style="line-height: 40px; width: 130px; margin-left: 8px;overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
							{if $li['nickname']!=''}{$li['nickname']}{else}{$li['uid']}{/if}
						</div>
					</div>
				</td>
				<td>{$li['reward']}</td>
				<td title="{$li['extra_reward']}">
                    <div style="width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
                    {$li['extra_reward']}
                    </div>
                </td>
				<td>{$li['today_total']}</td>
				<td>{$li['continue_total']}</td>
				<td>{$li['total']}</td>
				<td title="{$li['dateline']}.{$li['millisecond']}">{php echo str_replace(' ', '<br>', $li['dateline'])}.{$li['millisecond']}</td>
                {if version_compare(IMS_VERSION, '0.8', '>=')}
                <td>
                    <a class="btn btn-default btn-sm" target="_blank" href="{php echo url('mc/member/credit_record',array('type'=>$_GPC['credit_type'],'uid'=>$li['uid']))}" title="查看积分日志">
                        <i class="fa fa-list"></i>
                    </a>
                </td>
                {else}
                <td>
                    <a class="btn btn-default btn-sm" target="_blank" href="{php echo url('mc/creditmanage/stat',array('type'=>1,'uid'=>$li['uid']))}" title="查看积分日志">
                        <i class="fa fa-list"></i>
                    </a>
                </td>
                {/if}
			</tr>
			{/loop}
			</tbody>
		</table>
	</div>
</div>
{$pager}
{/if}
{template 'common/footer'}